package com.model;

// Generated 15 f�vr. 2013 15:56:26 by Hibernate Tools 4.0.0

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Client generated by hbm2java
 */
@Entity
@Table(name = "Client", schema = "dbo", catalog = "CRM")
public class Client implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int clientId;
	private Personne personne;
	private Date dateCreation;
	private String raisonSociale;
	private String siteWeb;
	private String memo;
	private Set<Enquete> enquetes = new HashSet<Enquete>(0);
	private Set<PersonneContact> personneContacts = new HashSet<PersonneContact>(0);
	private Set<Anomalie> anomalies = new HashSet<Anomalie>(0);
	private Set<Contrat> contrats = new HashSet<Contrat>(0);

	public Client() {
	}

	public Client(int clientId) {
		this.clientId = clientId;
	}

	public Client(int clientId, Personne personne, Date dateCreation,
			String raisonSociale, String siteWeb, String memo, Set<Enquete> enquetes,
			Set<PersonneContact> personneContacts, Set<Anomalie> anomalies, Set<Contrat> contrats) {
		this.clientId = clientId;
		this.personne = personne;
		this.dateCreation = dateCreation;
		this.raisonSociale = raisonSociale;
		this.siteWeb = siteWeb;
		this.memo = memo;
		this.enquetes = enquetes;
		this.personneContacts = personneContacts;
		this.anomalies = anomalies;
		this.contrats = contrats;
	}

	@Id
	@GeneratedValue
	@Column(name = "clientId", unique = true, nullable = false)
	public int getClientId() {
		return this.clientId;
	}

	public void setClientId(int clientId) {
		this.clientId = clientId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "personneId")
	public Personne getPersonne() {
		return this.personne;
	}

	public void setPersonne(Personne personne) {
		this.personne = personne;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "dateCreation", length = 23)
	public Date getDateCreation() {
		return this.dateCreation;
	}

	public void setDateCreation(Date dateCreation) {
		this.dateCreation = dateCreation;
	}

	@Column(name = "raisonSociale", length = 50)
	public String getRaisonSociale() {
		return this.raisonSociale;
	}

	public void setRaisonSociale(String raisonSociale) {
		this.raisonSociale = raisonSociale;
	}

	@Column(name = "siteWeb", length = 10)
	public String getSiteWeb() {
		return this.siteWeb;
	}

	public void setSiteWeb(String siteWeb) {
		this.siteWeb = siteWeb;
	}

	@Column(name = "memo", length = 100)
	public String getMemo() {
		return this.memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "client")
	public Set<Enquete> getEnquetes() {
		return this.enquetes;
	}

	public void setEnquetes(Set<Enquete> enquetes) {
		this.enquetes = enquetes;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "client")
	public Set<PersonneContact> getPersonneContacts() {
		return this.personneContacts;
	}

	public void setPersonneContacts(Set<PersonneContact> personneContacts) {
		this.personneContacts = personneContacts;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "client")
	public Set<Anomalie> getAnomalies() {
		return this.anomalies;
	}

	public void setAnomalies(Set<Anomalie> anomalies) {
		this.anomalies = anomalies;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "client")
	public Set<Contrat> getContrats() {
		return this.contrats;
	}

	public void setContrats(Set<Contrat> contrats) {
		this.contrats = contrats;
	}

}
